package com.house.controller;

import com.house.entity.Street;
import com.house.service.StreetService;
import com.house.util.BaseResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController     //区域
@CrossOrigin(value = "*",allowCredentials ="true")
@RequestMapping("/street/")
public class StreetController {
    @Autowired
    private  StreetService streetService;
    @RequestMapping("getStreetByDid")
    public BaseResult getStreetByDid( Integer districtId){
        List<Street> streetByDid = this.streetService.getStreetByDid(districtId);

return new BaseResult(15,streetByDid);
    }
}
